{{ define "home/index.html"}} {{ template "home/header" . }}

<body>
    {{ template "home/loading" . }}
    <link rel="stylesheet" href="/static/home/index-page.css">
    <div class="ancestor">
        {{ template "home/mask" .}}
        <div class="container-fluid container-root">
            <!-- 标题栏 -->
            {{ template "home/navbar" . }}
            <!-- 内容区 -->
            <div class="row content">
                <!-- 文章内容区域 -->
                <div class="col-md-10  col-sm-10  col-xs-12 contant-col">
                    <div class="alert alert-danger error-tips" role="alert"></div>
                    <div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 index-art-list">
                        <ol class="list-unstyled">
                            {{range .IndexArticleList}}
                            <li class="article-li" article-id="{{.Id}}">
                                <div class="index-article">
                                    <div>
                                        <div class="index-article-title">
                                            <h4>
                                                <a href="/articlepage?id={{.Id}}">{{.Title}}</a>
                                            </h4>
                                        </div>
                                    </div>
                                    <div>
                                        <div class="index-article-time">
                                            <span class="glyphicon glyphicon-send"></span><span class="post-time"> Posted on {{.LastEdit}}</span> <span class="post-line"> | </span> <span class="glyphicon glyphicon-folder-open"> </span> <span class="post-in"> In </span>
                                            <span class="post-catagery"><a href="">{{.Cat}}</a></span>
                                        </div>
                                    </div>

                                    <div class="index-article-content">
                                        {{.Content}}
                                    </div>
                                    <div>
                                        <div class="index-read-more">
                                            <span class="read-more-span">Read more »</span>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            {{end}}
                        </ol>
                        <div>
                            <nav class="navpage" aria-label="...">
                                <ul class="pager">
                                    <li class="previous disabled" page="1"><a href="javascript:void(0)"><span aria-hidden="true">&larr;</span> Older</a></li>
                                    {{ if ge .CurPage .TotalPage}}
                                    <li class="next disabled" page="{{.NextPage}}"><a href="javascript:void(0)">Newer <span aria-hidden="true">&rarr;</span></a></li>
                                    {{else}}
                                    <li class="next" page="{{.NextPage}}"><a href="javascript:void(0)">Newer <span aria-hidden="true">&rarr;</span></a></li>
                                    {{end}}
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>

                <!-- 页面右侧区域 -->
                <div class="col-md-2 col-sm-2 col-xs-12 right-side">
                    {{ template "home/rightside" . }}
                </div>
            </div>
            <!-- footer区域 -->
            {{ template "home/footer" . }}
        </div>
    </div>

    <script type="text/javascript" src="/static/home/index.js"></script>
    <script>
        hljs.initHighlightingOnLoad();
    </script>
</body>

</html>

{{ end }}